from django.contrib import admin

from polls.models import Car, Record


class CarModelAdmin(admin.ModelAdmin):
    list_display = ('no', 'carno', 'owner', 'brand')
    search_fields = ('owner',)
    ordering = ('no',)


class RecodeModelAdmin(admin.ModelAdmin):
    list_display = ('no', 'reason', 'punish', 'makedate', 'dealt', 'car',
                    'is_deleted', 'deleted_time', 'updated_time')
    search_fields = ('car_id',)
    ordering = ('no',)


admin.site.register(Car, CarModelAdmin)
admin.site.register(Record, RecodeModelAdmin)